import java.util.Comparator;


public class YComperator implements Comparator<Punkt3D> {

	@Override
	public int compare(Punkt3D o1, Punkt3D o2) {
		
		int compareTo = o1.getY().compareTo(o2.getY());
		if(compareTo == 0){
			compareTo = o1.getX().compareTo(o2.getX());
			if(compareTo == 0){
				compareTo = o1.getZ().compareTo(o2.getZ());
			}
		}
				
		return compareTo;
	}
	
	

}
